Auto-correlation circuit for use in pattern recognition

ABSTRACT

An auto-correlation unit for pattern recognition to obtain auto-correlation functions as for sampled signals is disclosed N pieces of sample values X n  (n=0 to N-1)are extracted from a series of the sample values expressed with an accuracy of optional multi-bits and the auto-correlation coefficients of these N pieces of the sample values obtained. The sum of sample values X n  and X n- τ (τ=0 to P) are calculated. The squared value (X n  +X n- τ) 2  of the added results is previously memorized in a ROM while being addressed by the resultant sum. The auto-correlation coefficients are available by feeding the output (X n  +X n- τ) 2  of the ROM and executing calculation as defined by the following equation: ##EQU1##

BACKGROUND OF THE INVENTION

This invention relates to an auto-correlation unit for use in pattern recognition to obtain auto-correlation coefficients as for stored signal samples.

Auto-correlation coefficient C.sub.τ used in pattern recognition for voice recognition can generally be obtained by the following equation: ##EQU2##

where τ indicates the degree of the auto-correlation coefficient sought to be calculated.

Conventional auto-correlation units for voice recognition are comprised of a multiplier and an adder. The multiplication items in the above equation are calculated and τ pieces of the auto-correlation coefficients are calculated by adding these results in the adder in order to obtain the cumulative sum thereof.

Those state-of-the-art units for calculation of the auto-correlation coefficients have the disadvantage of requiring expensive multipliers and also complicated circuitry. As a result the auto-correlation unit circuitry within the entire pattern recognition apparatus is proportionately large and auto-correlation calculation demands a greater amount of time during recognition.

SUMMARY OF THE INVENTION

The principal object of this invention is to provide an auto-correlation unit for pattern recognition which evaluates auto-correlation coefficients by means of a simple circuitry without the need for an expensive multiplier as well as eliminating the above discussed disadvantages.

Another object of this invention is to provide circuitry for calculation of approximate auto-correlation coefficients by squaring the sum of X_(i) and X_(i-)τ without a multiplier where X_(i), X_(i-)τ are stored signal samples.

To attain the above objectives, the auto-correlation unit for pattern recognition according to this invention is adapted to extract N pieces of sample values X_(n) (n=0 to N-1) from a series of sample values expressed with an accuracy of optional multiple bits. In securing the auto-correlation coefficients as for N pieces of the sample values, an addition means is used to evaluate the sum of the sample values X_(n) and X_(n-)τ (τ=0 to P) and then a ROM (read only memory) becomes operative to memorize the squares of the sum, (X_(n) +X_(n-)τ)², while being addressed by the results of the additions. Finally, using the output of the ROM, (X_(n) +X_(n-)τ)², the auto-correlation coefficients are evaluated as follows:

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be better understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only, and thus are not limitative of the present invention and wherein:

FIG. 1 is a block diagram schematically showing an embodiment of this invention;

FIG. 2 is a block diagram showing in more detail the embodiment of this invention;

FIG. 3 is an illustration of the input-to-output relation of a ROM in the arrangement as shown in FIG. 2; and

FIG. 4 is a time chart of operation of the auto-correlation unit of FIG. 2.

DETAILED DESCRIPTION OF THE INVENTION

An auto-correlation function R.sub.τ as for discrete input signals X_(n) (sample values) can generally be expressed as follows: ##EQU4##

If we normalize the input signals with the auto-correlation function R when τ=0, the auto-correlation coefficient C.sub.τ can be represented: ##EQU5## Considering R.sub.τ ' represented in terms of the square of the sum of X_(n) and X_(n-)τ, ##EQU6## Because the difference between the first and third items is very small if N>>P, reasonably good approximation of the auto-correlation coefficient is available as follows: ##EQU7## The above equation (3)' can be rewritten: ##EQU8## Equation (4) can be rewritten as follows, using the auto-correlation functions R₀ and R: ##EQU9## Equation (6) is available from equation (3)

    R.sub.0 '=4R.sub.0                                         (6)

Equation (7) is available from equations (5) and (6) ##EQU10## Equation (7) can be rewritten into equation (8): ##EQU11## Substituting equations (3) and (6) into equation (8), ##EQU12## Equation (9) reveals that the approximated value of the auto-correlation coefficient becomes available by squaring the sum of the input samples.

The following will describe in detail the way by which to calculate the auto-correlation coefficients according to equation (9), pursuant to the principle of the present invention.

In FIG. 1, an adder 1 is provided which adds sample values X_(n) and X_(n-)τ expressed with an accuracy of optional multiple bits (e.g. 8 bit) and the output (maximum: 9 bits) of the adder 1 is fed to a ROM 2 (read only memory) in the next stage as an address signal for the ROM 2. The memory ROM 2 is designed so that the square of 18 bits can be delivered upon receipt of the 9 bit input signal, while being addressed by the value (X_(n) +X_(n-)τ) from the adder 1. An adder 3 is further provided which repeats (n) times addition of the squared value from the ROM 2 with the memory contents of the RAM 4, in which the previous accumulated results are memorized. The results (X_(n) +X_(n-)τ)² is finally stored in a region "a" of memory 4.

Similarly, X_(n) is applied as address signals for the ROM 2 and the squared value X_(n) ² is fetched from the ROM 2. This value is cumulatively added (n=0 to N-1) and the result X_(n) ² is memorized in a region "b" of the memory 4.

A calculation unit 5 is provided to calculate the auto-correlation coefficient C by executing operations according to equation (9), based on the following squared cumulative values memorized in memory 4: ##EQU13## The contents read out from the region "b" of the memory 4 are doubled and divided by (P+1) pieces of the values read out from the region "b" of the memory 4 and subtraction of "1" is effected on the results of such division. This results in evaluating (P+1) pieces of the auto-correlation functions C.sub.τ (τ=0,1, . . . P).

In the foregoing manner, the auto-correlation coefficients used as feature parameters in pattern recognition of voice recognition systems can be approximately obtained by simple circuitry which is generally set up by the adder, the ROM and the one or more RAM's.

FIG. 2 shows details of the auto-correlation unit as shown in FIG. 1. This circuit generally includes an amplifier, an analog to digital converter, a ROM and RAM's, a central processing unit CPU for executing of approximation of the correlation coefficient and a timing generator for generation of various timing signals.

An analog signal (voice input) is amplified via the amplifier 10 and converted into an 8-bit binary offset code signal via the converter 11. f_(s) provides a start pulse to the analog to digital converter and a write pulse for the RAM 13. The resultant signal X_(n) is held in a latch 12 responsive to f_(k) and loaded into the RAM 13, while providing an A input to an adder 14 (corresponding to the adder 1 in FIG. 1). The RAM 13 is to store X_(n-)τ which in turn is outputted data X_(n-)τ with a delay τ in response to an address AD specified from the timing generator. Because of AD being 4 bits long, the RAM 13 is capable of storing data up to X_(n-15). The output of the RAM 13 is also 8 bits and fed to a B input to the adder 14 which in turn adds the latter to the A input thereof and results in X_(n) +X_(n-)τ. The result of scu addition or the sum X_(n) +X_(n-)τ is 9 bits including a carry bit. The ROM 15 is accessed by the resulting 9 bit output to fetch (X_(n) +X_(n-)τ)² which is previously stored therein. The reason why X_(n) +X_(n-)τ is stored in addresses A₁₀ -A₂ of the ROM is due to the facts that (X_(n) +X_(n-)τ)² consists of 32 bits and is divided into 4 groups in outputting the same. For such grouping signals f₁ and f₂ are fed from the timing generator to A₀ and A₁. The above procedure offers calculation of (X_(n) +X_(n-)τ)². Because of the upper 8 bits of (X_(n) +X_(n-)τ)² being constantly "0", calculation of Σ (X_(n) +X_(n-)τ)² is effected on only 24 bits while ignoring the upper 8 bits (see FIG. 3).

The following describes a calculation circuit for evaluating Σ (X_(n) +X_(n-)τ)², which circuit includes selectors 16 and 17, an adder 18, the RAM 22, buffers 21 and 23 and a clear gate 20. For simplicity of circuit design, the 8 bit output of the ROM 15 is further divided into two groups and addition is effected every 4 bits in evalulating Σ (X_(n) +X_(n-)τ)². The selectors S₁ and S₂ decide if signals under processing are the upper 4 bits or lower 4 bits of the 8 bit output of the ROM as selected by the least significant bit of the address ADS of the RAM 22. The address ADS is established through the timing generator 26.

The sequence will be now discussed in which Σ (X_(n) +X_(n-)τ)². The signals s₁ and s₂ are initially 00, addressing the lower 8 bits of (X_(n) +X_(n-)τ)². The output of the ROM is Y₇ -Y₀. At this moment the least significant bit of ADS selects the lower 4 bits so that Y₂ -Y₀ are fed to the B input of the adder 18 which also receives at its A input the lower 4 bits of Σ (X_(n) +X_(n-)τ)² currently fed from the RAM 22 through operation of the timing generator. The adder 18 seeks the sum of both the lower 4 bits and the results of such addition including a carry CA is held at a latch 19 in response to f₄. CA is the carry for the following 4 bit addition and CO is a carry originating during the lower 4 bit addition. The latter need be " 0" during the lower 4 bit addition and this demand is satisfied by f₃ from the timing generator. The results of calculation held by the latch 19 except the carry are loaded into the RAM 22. The buffer 21 is of a tristate type and shows a high impedance except during writing of the RAM 22. This timing requirement is determined by f₅.

Upon completion of the lower 4 bit calculation the address ADS of the RAM 22 is updated with the lowest bit thereof selecting the upper 4 bits. The upper 4 bit calculation is carried out in the same timed manner as with the lower 4 bit calculation. Calculation on the outputs Y₇ -Y₀ of the ROM is completed in this manner. Thereafter, f₁ and f₂ become "10" so that calculation proceeds in the order of the lower 4 bits and upper 4 bits with the result Σ (X_(n) +X_(n-)τ)² being placed into the RAM 22. This is true when f₁, f₂ are "01." Through the above routine of operations Σ (X_(n) +X_(n-)τ)² is calculated (n) times and the results of such calculations are written into the RAM 22.

Once Σ^(N) (X_(n) +X_(n-)τ)² has been evaluated, the timing generator informs the CPU of the end of calculation and at the same time renders S₃ operative so that the RAM 22 is accessible from the CPU. This is achieved with a signal INT from the timing generator. That is, the CPU is interrupted by the signal INT and fetches Σ^(N) (X_(n) +X_(n-)τ)² from the RAM 22. Because only the lower 4 bits of the resultant data are in effect, data matching is necessary. The correlation coefficient is obtained under the approximation as defined by equation (9).

During the interruption period C_(SUM) =0 in the timing generator and the output from the RAM 22 is cleared via the gate to secure Σ (X_(n) +X_(n-)τ)². The unit is therefore ready to calculate Σ (X_(n) +X_(n-)τ)². The CPU should pick up the correlation coefficient from the RAM 22 during the period where INT=0.

In FIG. 4, φ is a basic clock of 2.5 MHz (a pulse width of 200 ns). AD₃ -AD₀ are decremented at the start of each time frame and then incremented sequentially in the above manner. f_(k) and f_(s) have a pulse width of 200 ns and a frequency of 8 KHz. ADR₆ -ADR₃ are sequentially incremented as is clear from FIG. 4. f₄ and f₅ are not developed while INT is active.

As explained in the foregoing, this invention offers a highly cost effective auto-correlation unit for pattern recognition with simple circuitry without the need to use an expensive multiplier, but which has comparatively high accuracy and can, moreover, calculate auto-correlation coefficients at high speed. 

What is claimed is:
 1. An auto-correlation unit for providing auto-correlation coefficients for use as feature parameters in pattern recognition for N pieces of sampled input values X_(n) (n=0 to N-1), said unit comprising:means for extracting N pieces of sample input values X_(n) from a series of sample values in an input pattern expressed with an accuracy of optional multi-bits; means for calculating the sum of the sample values X_(n) and X_(n-)τ (τ=0-P, P≦N); a read only memory associated with said means for calculating; means for feeding to said read only memory the sum of the sampled input values as an address signal; means for storing in said read only memory the squared value of each sum, (X_(n) +X_(n-)τ)² ; means for fetching and outputting the squared values of each such sum of the sample input values from said read only memory when said memory is addressed by the sum of the sample input values; and means responsive to the output (X_(n) +X_(n-)τ)² of said read only memory for providing an auto-correlation coefficient for use as a feature parameter according to the following formula: ##EQU14## 